import { Component, OnInit } from '@angular/core'

import { File } from './../../models/file'

import { FileService } from './../../services/file.service'

@Component({
  selector: 'jq-store',
  templateUrl: './store.component.html'
})
export class StoreComponent implements OnInit {

  constructor(
    private fileService: FileService
  ) {}

  ngOnInit(): void {
    this.fileService.getFilesSlowly()
      .then(files => this.files = files.slice(0, 4))
  }

  files: File[];
}
